From 7e360a9957834e5658e2e398600e0d15d69afdf3 Mon Sep 17 00:00:00 2001 From: "Ian.Campbell@xensource.com" Date: Fri, 21 Apr 2006 17:49:10 +0100 Subject: [PATCH] Rename TSS_sysenter_esp0 to SYSENTER_stack_esp0 to reflect the actual usage since the TSS is not used under Xen. Signed-off-by: Ian Campbell --- .../arch/i386/kernel/asm-offsets.c | 4 +-- .../arch/i386/kernel/entry-xen.S | 6 ++-- ...SS_sysenter_esp0-SYSENTER_stack_esp0.patch | 31 +++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 patches/linux-2.6.16/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/asm-offsets.c b/linux-2.6-xen-sparse/arch/i386/kernel/asm-offsets.c index c7e3c078a2..547eb452b3 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/asm-offsets.c +++ b/linux-2.6-xen-sparse/arch/i386/kernel/asm-offsets.c @@ -66,11 +66,11 @@ void foo(void) #ifndef CONFIG_X86_NO_TSS /* Offset from the sysenter stack to tss.esp0 */ - DEFINE(TSS_sysenter_esp0, offsetof(struct tss_struct, esp0) - + DEFINE(SYSENTER_stack_esp0, offsetof(struct tss_struct, esp0) - sizeof(struct tss_struct)); #else /* sysenter stack points directly to esp0 */ - DEFINE(TSS_sysenter_esp0, 0); + DEFINE(SYSENTER_stack_esp0, 0); #endif DEFINE(PAGE_SIZE_asm, PAGE_SIZE); diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S b/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S index 770d2e1fb4..8c5ace45ef 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S +++ b/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S @@ -207,7 +207,7 @@ need_resched: # sysenter call handler stub ENTRY(sysenter_entry) - movl TSS_sysenter_esp0(%esp),%esp + movl SYSENTER_stack_esp0(%esp),%esp sysenter_past_esp: sti pushl $(__USER_DS) @@ -712,7 +712,7 @@ device_available_emulate: * that sets up the real kernel stack. Check here, since we can't * allow the wrong stack to be used. * - * "TSS_sysenter_esp0+12" is because the NMI/debug handler will have + * "SYSENTER_stack_esp0+12" is because the NMI/debug handler will have * already pushed 3 words if it hits on the sysenter instruction: * eflags, cs and eip. * @@ -724,7 +724,7 @@ device_available_emulate: cmpw $__KERNEL_CS,4(%esp); \ jne ok; \ label: \ - movl TSS_sysenter_esp0+offset(%esp),%esp; \ + movl SYSENTER_stack_esp0+offset(%esp),%esp; \ pushfl; \ pushl $__KERNEL_CS; \ pushl $sysenter_past_esp diff --git a/patches/linux-2.6.16/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch b/patches/linux-2.6.16/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch new file mode 100644 index 0000000000..7f99a397ab --- /dev/null +++ b/patches/linux-2.6.16/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch @@ -0,0 +1,31 @@ +Index: sysenter/linux-2.6-xen-sparse/arch/i386/kernel/entry.S +=================================================================== +--- linux-2.6.16.orig/arch/i386/kernel/entry.S 2006-04-05 11:12:51.000000000 +0100 ++++ linux-2.6.16/arch/i386/kernel/entry.S 2006-04-05 11:12:52.000000000 +0100 +@@ -177,7 +177,7 @@ + + # sysenter call handler stub + ENTRY(sysenter_entry) +- movl TSS_sysenter_esp0(%esp),%esp ++ movl SYSENTER_stack_esp0(%esp),%esp + sysenter_past_esp: + sti + pushl $(__USER_DS) +@@ -492,7 +492,7 @@ + * that sets up the real kernel stack. Check here, since we can't + * allow the wrong stack to be used. + * +- * "TSS_sysenter_esp0+12" is because the NMI/debug handler will have ++ * "SYSENTER_stack_esp0+12" is because the NMI/debug handler will have + * already pushed 3 words if it hits on the sysenter instruction: + * eflags, cs and eip. + * +@@ -504,7 +504,7 @@ + cmpw $__KERNEL_CS,4(%esp); \ + jne ok; \ + label: \ +- movl TSS_sysenter_esp0+offset(%esp),%esp; \ ++ movl SYSENTER_stack_esp0+offset(%esp),%esp; \ + pushfl; \ + pushl $__KERNEL_CS; \ + pushl $sysenter_past_esp -- 2.30.2